<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="dn20941">DROP VIEW</title><body><p id="sql_command_desc">Removes a view.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">DROP VIEW [IF EXISTS] <varname>name</varname> [, ...] [CASCADE | RESTRICT]</codeblock></section><section id="section3"><title>Description</title><p><codeph>DROP VIEW</codeph> will remove an existing view. Only the owner
of a view can remove it.</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt>IF EXISTS</pt><pd>Do not throw an error if the view does not exist. A notice is issued
in this case.</pd></plentry><plentry><pt><varname>name</varname></pt><pd>The name (optionally schema-qualified) of the view to remove.</pd></plentry><plentry><pt>CASCADE</pt><pd>Automatically drop objects that depend on the view (such as other
views).</pd></plentry><plentry><pt>RESTRICT</pt><pd>Refuse to drop the view if any objects depend on it. This is the
default.</pd></plentry></parml></section><section id="section5"><title>Examples</title><p>Remove the view <codeph>topten</codeph>;</p><codeblock>DROP VIEW topten;</codeblock></section><section id="section6"><title>Compatibility</title><p><codeph>DROP VIEW</codeph> is fully conforming with the SQL standard,
except that the standard only allows one view to be dropped per command.
Also, the <codeph>IF EXISTS</codeph> option is a Greenplum Database extension.</p></section><section id="section7"><title>See Also</title><p><codeph><xref href="CREATE_VIEW.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="ALTER_VIEW.xml#topic1" type="topic" format="dita"/></codeph></p></section></body></topic>
